<%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="${ f:url('/admin/admin.css') }" />
<title>Dashboard</title>
</head>
<body>
<div id="wrap">
	<div id="side">
        <jsp:include page="menu.jsp"></jsp:include>
	</div>
	<div id="main">
		<div id="content">
			<h1>記事一覧</h1>

			<jsp:include page="message.jsp"></jsp:include>

            <form action="${ f:url('./delete') }" method="post">
			<table border="1">
				<tr>
				    <th></th>
					<th>タイトル</th>
					<th>投稿日時</th>
				</tr>
<c:forEach var="e" items="${ list }">
				<tr>
				    <td><input type="checkbox" name="key" value="${ e.keyAsString }" /></td>
					<td><a href="${ f:url('edit') }?key=${ e.keyAsString }">${ f:h(e.title) }</a></td>
					<td><fmt:formatDate value="${ e.createdAt }" pattern="yyyy/MM/dd HH:mm" /></td>
				</tr>
</c:forEach>
			</table>
			<br />
			<input type="submit" value="チェックした項目を削除する" />
			</form>

		</div>
	</div>
	<div id="footer">
	</div>
</div>
</body>
</html>
